<template>
    <div class="panel">
      <el-row>
        <el-col :span="22">
          <div :class="{'pane': true,'paneActive': active}">
            <slot/>
          </div>
        </el-col>
        <el-col :span="2" style="line-height: 20px;">
          <i v-if="!active" class="el-icon-arrow-down" @click="active = true"></i>
          <i v-else class="el-icon-arrow-up" @click="active = false"></i>
        </el-col>
      </el-row>
    </div>
</template>

<script>
  export default {
    name: 'index',
    data() {
      return {
        active: false
      }
    }
  }
</script>

<style scoped>
  .panel {
    width: 100%;
    padding: 0px;
  }
  .pane {
    line-height: 20px;
    height: 20px;
    overflow:hidden;
  }
  .paneActive {
    height: auto;
  }
</style>
